import './App.css';

import React from "react";
import ReactDOM from "react-dom";
import { Switch, Route, withRouter, Redirect } from "react-router-dom";

import Manage from "./views/Manage"
import Login from "./views/Login"
import Reg from "./views/Reg"

import 'antd/dist/antd.css';

import { ConfigProvider } from 'antd';
import zh_CN from 'antd/lib/locale-provider/zh_CN';


function App() {
  return (
    <ConfigProvider locale={zh_CN}>
      <Switch>
        <Route path="/manage" component={Manage}></Route>
        <Route path="/login" component={Login}></Route>
        <Route path="/reg" component={Reg}></Route>
        <Route path="/404" render={() => <div>您访问的页面不存在</div>}></Route>
        <Redirect from="/" to="/manage" exact></Redirect>
        <Redirect from="/*" to="/404"></Redirect>
      </Switch>
    </ConfigProvider>
  )
}

export default withRouter(App)
